// import Login from './views/Login.vue'
const Login = () => import('./views/Login.vue') // 登录
const NotFound = () => import('./views/404.vue') // 404
const Home = () => import('./views/Home.vue') // 首页
const Allinfo = () => import('./views/Allinfo.vue') // 仪表盘
const Category = () => import('./views/warehouse/category.vue') // 商品/礼品分类
const GoodsManagement = () => import('./views/warehouse/goods-management.vue') // 商品管理
const Warehouse = () => import('./views/warehouse/warehouse.vue') // 仓库管理
const Purchase = () => import('./views/warehouse/purchase.vue') // 采购确认
const WarehouseWater = () => import('./views/warehouse/warehouse-water.vue') // 仓库流水

import Setting from './views/setting/seting' // 会员设置
// import fa from "element-ui/src/locale/lang/fa"

let routes = [
	{
			path: '/login',
			component: Login,
			name: '',
			hidden: true,
	meta: { keepAlive: false }
	},
	{
			path: '/404',
			component: NotFound,
			name: '',
			hidden: true,
	meta: { keepAlive: false }
	},
	{
	    path: '/',
	    component: Home,
	    name: '商城概述',
	    iconCls: 'fa fa-dashboard',
	    leaf: true,//只有一个节点
	    children: [
	        { path: '/allinfo', component: Allinfo, name: '仪表盘', meta: { keepAlive: false } }
	    ],
		meta: { keepAlive: false }
	},
	{
		path: '/',
		component: Home,
		name: '商品管理',
		iconCls: 'fa fa-gift',
		leaf: true,//只有一个节点
		children: [
			{ path: '/goods-management', component: GoodsManagement, name: '商品管理', meta: { keepAlive: false }  }
		],
		meta: { keepAlive: false }
	},
	{
		path: '/',
		component: Home,
		name: '仓库管理',
		iconCls: 'fa fa-university',
		leaf: true,//只有一个节点
		children: [
			{ path: '/warehouse', component: Warehouse, name: '仓库管理', meta: { keepAlive: true } }
		],
		meta: { keepAlive: false }
	},
	{
		path: '/',
		component: Home,
		name: '商品分类',
		iconCls: 'fa fa-share-alt',
		leaf: true,//只有一个节点
		children: [
			{ path: '/category', component: Category, name: '商品分类', meta: { keepAlive: false }  }
		],
		meta: { keepAlive: false }
	},
	{
		path: '/',
		component: Home,
		name: '采购确认',
		iconCls: 'fa fa-shopping-bag',
		leaf: true,//只有一个节点
		children: [
			{ path: '/purchase', component: Purchase, name: '采购确认', meta: { keepAlive: false }  }
		],
		meta: { keepAlive: false }
	},
	{
		path: '/',
		component: Home,
		name: '仓库流水',
		iconCls: 'fa fa-industry',
		leaf: true,//只有一个节点
		children: [
			{ path: '/warehouse-water', component: WarehouseWater, name: '仓库流水', meta: { keepAlive: false }  }
		],
		meta: { keepAlive: false }
	},
	// {
	// 	path: '/',
	// 	name: '仓管系统',
	// 	iconCls: 'fa fa-file-text', // 图标样式class
	// 	component: Home,
	// 	children: [
	// 		{ path: '/goods-management', component: GoodsManagement, name: '商品管理', meta: { keepAlive: false }  },
	// 		{ path: '/warehouse', component: Warehouse, name: '仓库管理', meta: { keepAlive: true } },
	// 		{ path: '/category', component: Category, name: '商品分类', meta: { keepAlive: false }  },
	// 		{ path: '/purchase', component: Purchase, name: '采购确认', meta: { keepAlive: false }  },
	// 		{ path: '/warehouse-water', component: WarehouseWater, name: '仓库流水', meta: { keepAlive: false }  },
	// 		// { path: '/category', component: Category, name: '商品分类', hidden: true }
	// 	],
	// 	meta: { keepAlive: false }
	// },
	{
			path: '*',
			hidden: true,
			redirect: { path: '/404' },
			meta: { keepAlive: false }
	}
]

export default routes;
